/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.miracleteam.miracle.utils;

import com.miracleteam.miracle.entities.Sanpham;
import java.util.Map;
import org.apache.tapestry5.OptionModel;

/**
 *
 * @author DangKhoa
 */
public class SanPhamOptionModel  implements OptionModel{
      private Sanpham SanPham;
    public SanPhamOptionModel(Sanpham dm)
    {
        this.SanPham=dm;
    }
    public String getLabel() {
        return this.SanPham.getTenSanPham();
    }

    public boolean isDisabled() {
        return false;
    }

     public Map<String, String> getAttributes() {
        return null;
    }

    public Object getValue() {
        //throw new UnsupportedOperationException("Not supported yet.");
        return this.SanPham;
    }
}
